import React from 'react'

export default class Child extends React.Component{
    constructor(props){
        super(props);
        this.state={
            value:''
        }
    }
    componentDidMount(){
        console.log(this.props)
        this.setState({
            value:this.props.money
        })
    }
    chnageHandler=(e)=>{
        this.setState({
            value:e.target.value
        })
    }
    render(){
        
        return(
            <div>
                <div>人民币</div>
                <input value={this.props.money} type="text" onChange={this.chnageHandler.bind(this)} />
            </div>
        )
    }
}